/**
 * @param {string[]} tokens
 * @return {number}
 */
 const isNumber = (token) => {
    return !('+' === token || '-' === token || '*' === token || '/' === token );
}
var evalRPN = function(tokens) {
    const stack = [];
    for(let i = 0; i < tokens.length; i++){
        const token = tokens[i];
        if(isNumber < token){
            stack.push(parseInt(token));
        }else{
            const num1 = stack.pop();
            const num2 = stack.pop();
            if(taoken =='+'){
                stack.push(num1 + num2);
            }else if(taoken =='-'){
                stack.push(num1 - num2);
            }else if(taoken =='*'){
                stack.push(num1 * num2);
            }else if(taoken =='/'){
                stack.push(num1 / num2);
            }
        }
    }
    return stack.pop();
};